package org.jeecg.modules.complain.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.jeecg.modules.complain.entity.ComplaintConfig;
import org.jeecg.modules.system.entity.SysDepartPosition;

import java.util.List;


/**
 * @Description: 配置
 * @Author: jeecg-boot
 * @Date:   2019-09-03
 * @Version: V1.0
 */
public interface ComplaintConfigMapper extends BaseMapper<ComplaintConfig> {

    @Select("select * from complaint_config where depart_id =#{departId} and del_flag='0'")
    ComplaintConfig selectByDepartId(@Param("departId")String departId);
    @Update("update complaint_config set del_flag ='1' where depart_id = #{departId}")
    void  deletByDepartId(@Param("departId")String departId);

    List<ComplaintConfig> selectAllComplainConfig(@Param("sysDepartPositionList") List<SysDepartPosition> sysDepartPositionList);
    @Select("select depart_id from base_project where id = #{projectId}")
    String getDepartIdByProject(@Param("projectId") String projectId);
}
